<style scoped>
	.layout {
		background: #1bbc9c;
		position: relative;
		overflow: hidden;

	}

	.layout-ceiling {
		background: #1bbc9c;
		overflow: hidden;
		height: 3.75em;

	}

	.layout-ceiling-main {
		float: right;
		margin-right: 1em;

	}

	.layout-ceiling-main a {
		color: white;
		line-height: 3.75em;
	}

	.left-content{
		float: left;
		background: #1bbc9c;
		overflow: hidden;
		height: 3.75em;
	}

	.logo{
		height: 2.5em;
    margin-top: 0.6125em;
    line-height: 3.75em;
    cursor:pointer;

	}
	@media print{
   .noprint{
       display:none;
   }
   .print{
       display:block;
   }
}
</style>
<template>
<div class="noprint">
	<div class="layout">
		<div class="left-content">
			<div class="left-content-main">
			<img class="logo" src="../../assets/images/common/logo3.png" @click="returnIndex" />
			</div>
		</div>
		<div class="layout-ceiling">
			<div class="layout-ceiling-main">
				<a href="javascript:">{{userInfo.name}}，欢迎你</a>
                <a href="javascript:">|</a>
                <a href="javascript:" @click="returnIndex">返回首页</a>
				<a href="javascript:">|</a>
				<a href="javascript:" @click="loginOut">安全退出</a>
			</div>
		</div>
	</div>
	</div>
</template>
<script>
  import {mapGetters} from 'vuex'
  import {requestPost} from "../../utils/js/HttpUtil"
  // 使用路由
  import router from '../../router/index'
	export default {
    computed: {
      ...mapGetters([
        'user'
      ]),
      userInfo() {
        return this.user
      }
    },
    data(){
      return{
        actions:{
          loginOut:"/system/user/loginOut"
        }
      }
    },
    methods:{
      loginOut(){
        requestPost(this.actions.loginOut, {}, (data) => {
          //完成后跳转到login页面
          router.push("/login");
        })
      },
      returnIndex(){
          this.$router.push({path:'/index'})
      }
    }
	}
</script>
